<?php

namespace app\api\validate;

use think\Validate;

class Address extends Validate
{
    protected $failException = false;

    protected $rule = [
        'uname'    => 'require',
        'phone'      => 'mobile|require',
        'area' => 'require',
        'address'       => 'require',

    ];
    protected $message = [
        'uname.require' => '姓名不能为空',
        'address.require' => '详细地址不能为空',
        'phone.mobile'=>'手机格式错误',
        'phone.require' => '手机号码不能为空',
        'area.require' =>'请选择所属地区'

    ];
 	 /**
     * 验证场景
     */
    protected $scene = [
         'add'             => ['uname', 'phone', 'area','address']
    ];

 
}